/**
 * message
 * data: 2011
 * author: haaway studio
 */
$(function(){

    
    
});
function hw_a(msg, title){

    var title = title || '提示';
    
    $.weeboxs.open(msg, {
        title: title,
        type: 'alert'
    });
    
}

function chkmsg(){
	if($('#msg_title').val() == ''){ hw_a('标题不可为空'); return false;}
	if($('#msg_content').val() == ''){ hw_a('内容不可为空'); return false;}
	
	var valcode = $('#yzm').val();
	if($.trim(valcode) == ''){ hw_a('验证码不可为空'); return false;}
	$.ajax({    
        type: "POST",        
        /*url: "/message/chkyzm/" + valcode + ".html",*/  
		url: "?m=message&f=chkyzm" + valcode + '&'+Math.random(1),         
        data: "valcode=" + valcode,        
        success: function(d){ 
            if(d == '0'){
				hw_a('验证码填写错误！');return false;
			}else if(d == '1'){
				return true;
			}else{
				hw_a('未知错误！'); return false;
			}
        }
        
        
        
    });
	
}

